<!DOCTYPE html>
<html>
    <head>
        <title>demo</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <style>
            body {
                font-family: Monospace;
                background-color: #f0f0f0;
                margin: 0px;
                overflow: hidden;
            }
        </style>
    </head>
    <body>
        <script src="https://cdn.bootcdn.net/ajax/libs/three.js/73/three.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/tween.js/0.11.0/Tween.min.js"></script>
		<script src="https://unpkg.com/three@0.73.1/examples/js/controls/TrackballControls.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/stats.js/10/Stats.min.js"></script>
        <script>

            var jsonstr = '[{"boxId":"94266080108M456","x":-80.199997,"y":-110.699997,"z":-565.299988,"width":61.400002,"height":38.599998,"length":71.400002,"weight":74.000000,"platform":"platform52","order":1,"material":"","type":1,"place":200},{"boxId":"94266080108M455","x":-80.199997,"y":-72.099998,"z":-565.299988,"width":61.400002,"height":38.599998,"length":71.400002,"weight":74.000000,"platform":"platform52","order":2,"material":"","type":1,"place":200},{"boxId":"94266080108M454","x":-80.199997,"y":-33.500000,"z":-565.299988,"width":61.400002,"height":38.599998,"length":71.400002,"weight":74.000000,"platform":"platform52","order":3,"material":"","type":1,"place":200},{"boxId":"94266080108M453","x":-80.199997,"y":5.100000,"z":-565.299988,"width":61.400002,"height":38.599998,"length":71.400002,"weight":74.000000,"platform":"platform52","order":4,"material":"","type":1,"place":200},{"boxId":"94266080108M452","x":-80.199997,"y":43.700001,"z":-565.299988,"width":61.400002,"height":38.599998,"length":71.400002,"weight":74.000000,"platform":"platform52","order":5,"material":"","type":1,"place":200},{"boxId":"94266080108M451","x":-80.199997,"y":82.300003,"z":-565.299988,"width":61.400002,"height":38.599998,"length":71.400002,"weight":74.000000,"platform":"platform52","order":6,"material":"","type":1,"place":200},{"boxId":"94266080108N488","x":-0.500000,"y":-100.750000,"z":-568.000000,"width":56.000000,"height":58.500000,"length":88.000000,"weight":56.000000,"platform":"platform04","order":7,"material":"","type":1,"place":200},{"boxId":"94266080108L279","x":-55.900002,"y":-87.750000,"z":-494.600006,"width":80.000000,"height":84.500000,"length":120.000000,"weight":102.400002,"platform":"platform04","order":8,"material":"","type":1,"place":200},{"boxId":"94266080108L732","x":-88.800003,"y":109.099998,"z":-576.400024,"width":39.200001,"height":15.000000,"length":54.200001,"weight":10.485000,"platform":"platform03","order":9,"material":"","type":1,"place":200},{"boxId":"942660801084238","x":22.850000,"y":-62.750000,"z":-577.750000,"width":36.500000,"height":17.500000,"length":37.500000,"weight":5.310000,"platform":"platform03","order":10,"material":"","type":1,"place":200},{"boxId":"94266080108C437","x":-84.650002,"y":-3.000000,"z":-493.350006,"width":62.500000,"height":85.000000,"length":82.500000,"weight":119.500000,"platform":"platform03","order":11,"material":"","type":1,"place":100},{"boxId":"94266080108C436","x":-85.900002,"y":70.500000,"z":-494.600006,"width":60.000000,"height":62.000000,"length":80.000000,"weight":55.000000,"platform":"platform03","order":12,"material":"","type":1,"place":100},{"boxId":"94266080108L031","x":-58.650002,"y":-109.199997,"z":-303.000000,"width":114.500000,"height":41.599998,"length":298.200012,"weight":200.500000,"platform":"platform03","order":13,"material":"","type":1,"place":100},{"boxId":"942660801084237","x":-63.200001,"y":-71.599998,"z":-359.049988,"width":105.400002,"height":33.599998,"length":186.100006,"weight":109.000000,"platform":"platform03","order":14,"material":"","type":1,"place":100},{"boxId":"94266080108L030","x":25.100000,"y":-116.199997,"z":-303.100006,"width":53.000000,"height":27.600000,"length":298.000000,"weight":66.500000,"platform":"platform03","order":15,"material":"","type":1,"place":100},{"boxId":"94266080108M500","x":-103.150002,"y":121.349998,"z":-578.750000,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.550000,"platform":"platform08","order":16,"material":"","type":1,"place":100},{"boxId":"94266080108M486","x":-77.650002,"y":121.349998,"z":-578.750000,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.550000,"platform":"platform08","order":17,"material":"","type":1,"place":100},{"boxId":"94266080108M483","x":-53.049999,"y":106.199997,"z":-585.099976,"width":17.299999,"height":9.200000,"length":21.799999,"weight":0.350000,"platform":"platform08","order":18,"material":"","type":1,"place":100},{"boxId":"942660801081891","x":-53.049999,"y":115.400002,"z":-585.099976,"width":17.299999,"height":9.200000,"length":21.799999,"weight":0.250000,"platform":"platform08","order":19,"material":"","type":1,"place":100},{"boxId":"94266080108M514","x":-98.650002,"y":106.349998,"z":-544.049988,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":20,"material":"","type":1,"place":200},{"boxId":"94266080108M539","x":-98.650002,"y":115.849998,"z":-544.049988,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":21,"material":"","type":1,"place":200},{"boxId":"94266080108M491","x":-64.150002,"y":106.349998,"z":-544.049988,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":22,"material":"","type":1,"place":200},{"boxId":"94266080108M524","x":-64.150002,"y":115.849998,"z":-544.049988,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":23,"material":"","type":1,"place":200},{"boxId":"94266080108M533","x":21.350000,"y":-49.250000,"z":-583.250000,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":24,"material":"","type":1,"place":200},{"boxId":"94266080108M503","x":21.350000,"y":-39.750000,"z":-583.250000,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":25,"material":"","type":1,"place":200},{"boxId":"94266080108M506","x":21.350000,"y":-30.250000,"z":-583.250000,"width":25.500000,"height":9.500000,"length":34.500000,"weight":0.500000,"platform":"platform08","order":26,"material":"","type":1,"place":200},{"boxId":"94266080108J645","x":80.849998,"y":-112.000000,"z":-576.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.940001,"platform":"platform08","order":27,"material":"","type":1,"place":200},{"boxId":"94266080108J651","x":80.849998,"y":-76.000000,"z":-576.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.820000,"platform":"platform08","order":28,"material":"","type":1,"place":200},{"boxId":"94266080108J653","x":80.849998,"y":-40.000000,"z":-576.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.780001,"platform":"platform08","order":29,"material":"","type":1,"place":200},{"boxId":"94266080108J707","x":80.849998,"y":-4.000000,"z":-576.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.780001,"platform":"platform08","order":30,"material":"","type":1,"place":200},{"boxId":"94266080108J673","x":80.849998,"y":32.000000,"z":-576.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.760000,"platform":"platform08","order":31,"material":"","type":1,"place":200},{"boxId":"94266080108J665","x":80.849998,"y":68.000000,"z":-576.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.760000,"platform":"platform08","order":32,"material":"","type":1,"place":200},{"boxId":"94266080108J735","x":80.849998,"y":104.000000,"z":-576.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.740000,"platform":"platform08","order":33,"material":"","type":1,"place":200},{"boxId":"94266080108M567","x":-89.650002,"y":111.750000,"z":-510.049988,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":34,"material":"","type":1,"place":200},{"boxId":"94266080108M507","x":-89.650002,"y":111.750000,"z":-467.549988,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.800000,"platform":"platform08","order":35,"material":"","type":1,"place":200},{"boxId":"94266080108L033","x":-16.900000,"y":-3.750000,"z":-491.299988,"width":60.000000,"height":83.500000,"length":80.000000,"weight":45.500000,"platform":"platform08","order":36,"material":"","type":1,"place":100},{"boxId":"94266080108J708","x":-33.299999,"y":53.000000,"z":-495.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":37,"material":"","type":1,"place":100},{"boxId":"94266080108J688","x":-6.100000,"y":53.000000,"z":-495.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":38,"material":"","type":1,"place":100},{"boxId":"94266080108J654","x":-33.299999,"y":83.000000,"z":-495.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":39,"material":"","type":1,"place":100},{"boxId":"94266080108J700","x":-6.100000,"y":83.000000,"z":-495.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":40,"material":"","type":1,"place":100},{"boxId":"94266080108J692","x":-33.299999,"y":113.000000,"z":-495.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":41,"material":"","type":1,"place":100},{"boxId":"94266080108J720","x":-6.100000,"y":113.000000,"z":-495.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":42,"material":"","type":1,"place":100},{"boxId":"94266080108J643","x":80.849998,"y":-112.000000,"z":-520.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.719999,"platform":"platform08","order":43,"material":"","type":1,"place":200},{"boxId":"94266080108J687","x":80.849998,"y":-76.000000,"z":-520.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.719999,"platform":"platform08","order":44,"material":"","type":1,"place":200},{"boxId":"94266080108J713","x":80.849998,"y":-40.000000,"z":-520.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.719999,"platform":"platform08","order":45,"material":"","type":1,"place":200},{"boxId":"94266080108J725","x":80.849998,"y":-4.000000,"z":-520.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.700001,"platform":"platform08","order":46,"material":"","type":1,"place":200},{"boxId":"94266080108J719","x":80.849998,"y":32.000000,"z":-520.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.680000,"platform":"platform08","order":47,"material":"","type":1,"place":200},{"boxId":"94266080108J701","x":80.849998,"y":68.000000,"z":-520.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.680000,"platform":"platform08","order":48,"material":"","type":1,"place":200},{"boxId":"94266080108J689","x":80.849998,"y":104.000000,"z":-520.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.680000,"platform":"platform08","order":49,"material":"","type":1,"place":200},{"boxId":"94266080108M534","x":77.849998,"y":-119.750000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":50,"material":"","type":1,"place":200},{"boxId":"94266080108M552","x":77.849998,"y":-99.250000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":51,"material":"","type":1,"place":200},{"boxId":"94266080108M489","x":77.849998,"y":-78.750000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":52,"material":"","type":1,"place":200},{"boxId":"94266080108M554","x":77.849998,"y":-58.250000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":53,"material":"","type":1,"place":200},{"boxId":"94266080108M549","x":77.849998,"y":-37.750000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":54,"material":"","type":1,"place":200},{"boxId":"94266080108M493","x":77.849998,"y":-17.250000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":55,"material":"","type":1,"place":200},{"boxId":"94266080108M509","x":77.849998,"y":3.250000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.750000,"platform":"platform08","order":56,"material":"","type":1,"place":200},{"boxId":"94266080108M546","x":77.849998,"y":23.750000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.700000,"platform":"platform08","order":57,"material":"","type":1,"place":200},{"boxId":"94266080108N578","x":77.849998,"y":44.250000,"z":-479.750000,"width":42.500000,"height":20.500000,"length":52.500000,"weight":15.200000,"platform":"platform08","order":58,"material":"","type":1,"place":200},{"boxId":"94266080108J699","x":80.849998,"y":72.500000,"z":-481.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.660000,"platform":"platform08","order":59,"material":"","type":1,"place":200},{"boxId":"94266080108J691","x":80.849998,"y":108.500000,"z":-481.500000,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.660000,"platform":"platform08","order":60,"material":"","type":1,"place":200},{"boxId":"94266080108J652","x":-80.300003,"y":-39.799999,"z":-432.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":61,"material":"","type":1,"place":200},{"boxId":"94266080108J676","x":-80.300003,"y":-39.799999,"z":-405.500000,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":62,"material":"","type":1,"place":200},{"boxId":"94266080108J702","x":-80.300003,"y":-9.800000,"z":-432.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":63,"material":"","type":1,"place":200},{"boxId":"94266080108J674","x":-80.300003,"y":-9.800000,"z":-405.500000,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":64,"material":"","type":1,"place":200},{"boxId":"94266080108J736","x":-80.300003,"y":20.200001,"z":-432.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":65,"material":"","type":1,"place":200},{"boxId":"94266080108J730","x":-80.300003,"y":20.200001,"z":-405.500000,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":66,"material":"","type":1,"place":200},{"boxId":"94266080108J726","x":-80.300003,"y":50.200001,"z":-432.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":67,"material":"","type":1,"place":200},{"boxId":"94266080108J714","x":-80.300003,"y":50.200001,"z":-405.500000,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":68,"material":"","type":1,"place":200},{"boxId":"94266080108J638","x":-80.300003,"y":80.199997,"z":-432.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":69,"material":"","type":1,"place":200},{"boxId":"94266080108J666","x":-80.300003,"y":80.199997,"z":-405.500000,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":70,"material":"","type":1,"place":200},{"boxId":"94266080108J644","x":-80.300003,"y":110.199997,"z":-432.700012,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":71,"material":"","type":1,"place":200},{"boxId":"94266080108J690","x":-80.300003,"y":110.199997,"z":-405.500000,"width":27.200001,"height":30.000000,"length":71.199997,"weight":5.420000,"platform":"platform08","order":72,"material":"","type":1,"place":200},{"boxId":"94266080108J675","x":-25.200001,"y":-36.799999,"z":-417.049988,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.660000,"platform":"platform08","order":73,"material":"","type":1,"place":100},{"boxId":"94266080108J729","x":-25.200001,"y":-0.800000,"z":-417.049988,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.660000,"platform":"platform08","order":74,"material":"","type":1,"place":100},{"boxId":"94266080108J637","x":-25.200001,"y":35.200001,"z":-417.049988,"width":39.000000,"height":36.000000,"length":58.500000,"weight":25.660000,"platform":"platform08","order":75,"material":"","type":1,"place":100},{"boxId":"94266080108J646","x":-76.650002,"y":-35.549999,"z":-367.549988,"width":40.500000,"height":38.500000,"length":78.500000,"weight":12.280000,"platform":"platform08","order":76,"material":"","type":1,"place":200},{"boxId":"94266080108R746","x":-85.650002,"y":-30.049999,"z":-317.049988,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":77,"material":"","type":1,"place":100},{"boxId":"94266080108R745","x":-85.650002,"y":19.450001,"z":-317.049988,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":78,"material":"","type":1,"place":100},{"boxId":"94266080108R744","x":-85.650002,"y":68.949997,"z":-317.049988,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":79,"material":"","type":1,"place":100},{"boxId":"94266080108R743","x":-85.650002,"y":-63.650002,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":80,"material":"","type":1,"place":100},{"boxId":"94266080108R742","x":-85.650002,"y":-14.150000,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":81,"material":"","type":1,"place":100},{"boxId":"94266080108R741","x":-85.650002,"y":35.349998,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":82,"material":"","type":1,"place":100},{"boxId":"94266080108R740","x":-85.650002,"y":84.849998,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":83,"material":"","type":1,"place":100},{"boxId":"94266080108R739","x":-25.150000,"y":-63.650002,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":84,"material":"","type":1,"place":100},{"boxId":"94266080108R738","x":-25.150000,"y":-14.150000,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":85,"material":"","type":1,"place":100},{"boxId":"94266080108R737","x":-25.150000,"y":35.349998,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":86,"material":"","type":1,"place":100},{"boxId":"94266080108R736","x":-25.150000,"y":84.849998,"z":-235.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":87,"material":"","type":1,"place":100},{"boxId":"94266080108R735","x":-85.650002,"y":-63.650002,"z":-175.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":88,"material":"","type":1,"place":100},{"boxId":"94266080108R734","x":-85.650002,"y":-14.150000,"z":-175.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":89,"material":"","type":1,"place":100},{"boxId":"94266080108R733","x":-85.650002,"y":35.349998,"z":-175.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":90,"material":"","type":1,"place":100},{"boxId":"94266080108R732","x":-85.650002,"y":84.849998,"z":-175.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":91,"material":"","type":1,"place":100},{"boxId":"94266080108R731","x":81.849998,"y":-105.250000,"z":-421.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":92,"material":"","type":1,"place":100},{"boxId":"94266080108R730","x":81.849998,"y":-105.250000,"z":-361.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":93,"material":"","type":1,"place":100},{"boxId":"94266080108R729","x":81.849998,"y":-105.250000,"z":-300.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":94,"material":"","type":1,"place":100},{"boxId":"94266080108R728","x":81.849998,"y":-105.250000,"z":-240.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":95,"material":"","type":1,"place":100},{"boxId":"94266080108R727","x":81.849998,"y":-55.750000,"z":-421.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":96,"material":"","type":1,"place":100},{"boxId":"94266080108R726","x":81.849998,"y":-55.750000,"z":-361.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":97,"material":"","type":1,"place":100},{"boxId":"94266080108R725","x":81.849998,"y":-55.750000,"z":-300.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":98,"material":"","type":1,"place":100},{"boxId":"94266080108R724","x":81.849998,"y":-55.750000,"z":-240.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":99,"material":"","type":1,"place":100},{"boxId":"94266080108R723","x":81.849998,"y":-6.250000,"z":-421.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":100,"material":"","type":1,"place":100},{"boxId":"94266080108R722","x":81.849998,"y":-6.250000,"z":-361.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":101,"material":"","type":1,"place":100},{"boxId":"94266080108R721","x":81.849998,"y":-6.250000,"z":-300.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":102,"material":"","type":1,"place":100},{"boxId":"94266080108R720","x":81.849998,"y":-6.250000,"z":-240.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":103,"material":"","type":1,"place":100},{"boxId":"94266080108R719","x":81.849998,"y":43.250000,"z":-421.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":104,"material":"","type":1,"place":100},{"boxId":"94266080108R718","x":81.849998,"y":43.250000,"z":-361.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":105,"material":"","type":1,"place":100},{"boxId":"94266080108R717","x":81.849998,"y":43.250000,"z":-300.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":106,"material":"","type":1,"place":100},{"boxId":"94266080108R716","x":81.849998,"y":43.250000,"z":-240.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":107,"material":"","type":1,"place":100},{"boxId":"94266080108R715","x":81.849998,"y":92.750000,"z":-421.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":108,"material":"","type":1,"place":100},{"boxId":"94266080108R714","x":81.849998,"y":92.750000,"z":-361.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":109,"material":"","type":1,"place":100},{"boxId":"94266080108R713","x":81.849998,"y":92.750000,"z":-300.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":110,"material":"","type":1,"place":100},{"boxId":"94266080108R712","x":81.849998,"y":92.750000,"z":-240.350006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":111,"material":"","type":1,"place":100},{"boxId":"94266080108R711","x":81.849998,"y":-105.250000,"z":-179.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":112,"material":"","type":1,"place":100},{"boxId":"94266080108R710","x":81.849998,"y":-55.750000,"z":-179.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":113,"material":"","type":1,"place":100},{"boxId":"94266080108R709","x":81.849998,"y":-6.250000,"z":-179.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":114,"material":"","type":1,"place":100},{"boxId":"94266080108R708","x":81.849998,"y":43.250000,"z":-179.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":115,"material":"","type":1,"place":100},{"boxId":"94266080108R707","x":81.849998,"y":92.750000,"z":-179.850006,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":116,"material":"","type":1,"place":100},{"boxId":"94266080108R487","x":-85.650002,"y":-105.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":117,"material":"","type":1,"place":100},{"boxId":"94266080108R486","x":-25.150000,"y":-105.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":118,"material":"","type":1,"place":100},{"boxId":"94266080108R485","x":35.349998,"y":-105.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":119,"material":"","type":1,"place":100},{"boxId":"94266080108R484","x":-85.650002,"y":-55.750000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":120,"material":"","type":1,"place":100},{"boxId":"94266080108R483","x":-25.150000,"y":-55.750000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":121,"material":"","type":1,"place":100},{"boxId":"94266080108R482","x":35.349998,"y":-55.750000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":122,"material":"","type":1,"place":100},{"boxId":"94266080108R481","x":-85.650002,"y":-6.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":123,"material":"","type":1,"place":100},{"boxId":"94266080108R480","x":-25.150000,"y":-6.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":124,"material":"","type":1,"place":100},{"boxId":"94266080108R479","x":35.349998,"y":-6.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":125,"material":"","type":1,"place":100},{"boxId":"94266080108R478","x":-85.650002,"y":43.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":126,"material":"","type":1,"place":100},{"boxId":"94266080108R477","x":-25.150000,"y":43.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":127,"material":"","type":1,"place":100},{"boxId":"94266080108R476","x":35.349998,"y":43.250000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":128,"material":"","type":1,"place":100},{"boxId":"94266080108R475","x":-85.650002,"y":92.750000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":129,"material":"","type":1,"place":100},{"boxId":"94266080108R474","x":-25.150000,"y":92.750000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":130,"material":"","type":1,"place":100},{"boxId":"94266080108R473","x":35.349998,"y":92.750000,"z":-114.750000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":131,"material":"","type":1,"place":100},{"boxId":"94266080108R472","x":-85.650002,"y":-105.250000,"z":-54.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":132,"material":"","type":1,"place":100},{"boxId":"94266080108R471","x":-85.650002,"y":-55.750000,"z":-54.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":133,"material":"","type":1,"place":100},{"boxId":"94266080108R470","x":-85.650002,"y":-6.250000,"z":-54.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":134,"material":"","type":1,"place":100},{"boxId":"94266080108R469","x":-85.650002,"y":43.250000,"z":-54.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":135,"material":"","type":1,"place":100},{"boxId":"94266080108R468","x":-85.650002,"y":92.750000,"z":-54.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":136,"material":"","type":1,"place":100},{"boxId":"94266080108R467","x":-25.150000,"y":-105.250000,"z":-54.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":137,"material":"","type":1,"place":100},{"boxId":"94266080108R466","x":-25.150000,"y":-55.750000,"z":-54.250000,"width":60.500000,"height":49.500000,"length":60.500000,"weight":260.000000,"platform":"platform12","order":138,"material":"","type":1,"place":100},{"boxId":"942660801088179","x":88.599998,"y":-102.500000,"z":-117.500000,"width":46.000000,"height":55.000000,"length":55.000000,"weight":99.199997,"platform":"platform05","order":139,"material":"","type":1,"place":100},{"boxId":"942660801088180","x":88.599998,"y":-47.500000,"z":-117.500000,"width":46.000000,"height":55.000000,"length":55.000000,"weight":98.400002,"platform":"platform05","order":140,"material":"","type":1,"place":100},{"boxId":"942660801088181","x":90.099998,"y":-10.000000,"z":-120.500000,"width":49.000000,"height":20.000000,"length":49.000000,"weight":60.759998,"platform":"platform05","order":141,"material":"","type":1,"place":100},{"boxId":"94266080108L507","x":87.099998,"y":10.000000,"z":-123.500000,"width":43.000000,"height":20.000000,"length":43.000000,"weight":24.700001,"platform":"platform05","order":142,"material":"","type":1,"place":100},{"boxId":"942660801084379","x":88.599998,"y":28.500000,"z":-122.000000,"width":46.000000,"height":17.000000,"length":46.000000,"weight":27.299999,"platform":"platform05","order":143,"material":"","type":1,"place":100},{"boxId":"942660801088330","x":84.599998,"y":45.000000,"z":-126.000000,"width":38.000000,"height":16.000000,"length":38.000000,"weight":34.810001,"platform":"platform05","order":144,"material":"","type":1,"place":100},{"boxId":"942660801088471","x":45.099998,"y":-95.000000,"z":-60.500000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":69.500000,"platform":"platform10","order":145,"material":"","type":1,"place":200},{"boxId":"94266080108B911","x":45.099998,"y":-25.000000,"z":-60.500000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":67.500000,"platform":"platform10","order":146,"material":"","type":1,"place":200},{"boxId":"94266080108B908","x":45.099998,"y":45.000000,"z":-60.500000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":67.500000,"platform":"platform10","order":147,"material":"","type":1,"place":200},{"boxId":"94266080108L219","x":-75.900002,"y":-85.750000,"z":0.000000,"width":48.000000,"height":88.500000,"length":80.000000,"weight":92.500000,"platform":"platform10","order":148,"material":"","type":1,"place":200},{"boxId":"94266080108L218","x":4.100000,"y":-85.750000,"z":0.000000,"width":48.000000,"height":88.500000,"length":80.000000,"weight":92.500000,"platform":"platform10","order":149,"material":"","type":1,"place":200},{"boxId":"94266080108L217","x":-75.900002,"y":2.750000,"z":0.000000,"width":48.000000,"height":88.500000,"length":80.000000,"weight":92.500000,"platform":"platform10","order":150,"material":"","type":1,"place":200},{"boxId":"94266080108L220","x":4.100000,"y":2.750000,"z":0.000000,"width":48.000000,"height":88.500000,"length":80.000000,"weight":90.500000,"platform":"platform10","order":151,"material":"","type":1,"place":200},{"boxId":"94266080108B907","x":-75.900002,"y":82.000000,"z":0.000000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":67.500000,"platform":"platform10","order":152,"material":"","type":1,"place":200},{"boxId":"94266080108L266","x":4.100000,"y":82.000000,"z":0.000000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":67.000000,"platform":"platform10","order":153,"material":"","type":1,"place":200},{"boxId":"94266080108B912","x":-75.900002,"y":-95.000000,"z":48.000000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":67.000000,"platform":"platform10","order":154,"material":"","type":1,"place":200},{"boxId":"94266080108B910","x":-75.900002,"y":-25.000000,"z":48.000000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":67.000000,"platform":"platform10","order":155,"material":"","type":1,"place":200},{"boxId":"94266080108B909","x":-75.900002,"y":45.000000,"z":48.000000,"width":48.000000,"height":70.000000,"length":80.000000,"weight":67.000000,"platform":"platform10","order":156,"material":"","type":1,"place":200},{"boxId":"94266080108B913","x":4.100000,"y":-104.500000,"z":48.000000,"width":48.000000,"height":51.000000,"length":80.000000,"weight":47.000000,"platform":"platform10","order":157,"material":"","type":1,"place":200},{"boxId":"94266080108L089","x":59.599998,"y":90.000000,"z":-69.000000,"width":31.000000,"height":20.000000,"length":31.000000,"weight":11.790000,"platform":"platform07","order":158,"material":"","type":1,"place":100},{"boxId":"94266080108N633","x":-64.900002,"y":-102.000000,"z":123.000000,"width":102.000000,"height":56.000000,"length":102.000000,"weight":324.000000,"platform":"platform07","order":159,"material":"","type":1,"place":100},{"boxId":"94266080108J903","x":-22.150000,"y":-123.500000,"z":212.000000,"width":76.000000,"height":13.000000,"length":187.500000,"weight":47.500000,"platform":"platform07","order":160,"material":"","type":1,"place":200}]';
			var jsonstr2 = '{"container_length":1192.000000,"container_width":231.800003,"container_height":260.000000,"container_max_load":null,"container_type_name":"40HQ"}'
            var objectArray= JSON.parse(jsonstr);
			var truckJsonObj = JSON.parse(jsonstr2);
            var container, stats;
            var camera, controls, scene, projector, renderer;
            var objects = [], plane;
            var mouse = new THREE.Vector2(), offset = new THREE.Vector3(), INTERSECTED, SELECTED; 
            init();
            animate();
            function init() {
                container = document.createElement( 'div' );
                document.body.appendChild( container );
                camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 );
                camera.position.x = -600;
                camera.position.y = 400;
                camera.position.z = 1000;
                controls = new THREE.TrackballControls( camera );
                controls.rotateSpeed = 1.0;
                controls.zoomSpeed = 1.2;
                controls.panSpeed = 0.8;
                controls.noZoom = false;
                controls.noPan = true;
                controls.staticMoving = false;
                controls.dynamicDampingFactor = 0.3;
                scene = new THREE.Scene();
                var ambientLight = new THREE.AmbientLight( Math.random() *0xffffff );
                scene.add( ambientLight );
                var directionalLight = new THREE.DirectionalLight( Math.random() * 0xffffff );
                directionalLight.position.set( 0, 1, 0 );
                scene.add( directionalLight );
                var pointLight = new THREE.PointLight( 0xff0000, 1, 500 );
                pointLight.position.set( 0, 0, -200 );
                scene.add( pointLight );

                container_length = truckJsonObj.container_length;
                container_width = truckJsonObj.container_width;
                container_height = truckJsonObj.container_height;
                var cube_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( container_width, container_height, container_length, 1,1,1 ), 
                    new THREE.MeshBasicMaterial( { color:0xefb73e, wireframe:true } )
                );
                cube_1.position.x = 0;
                cube_1.position.y = 0;
                cube_1.position.z = 0;
                scene.add( cube_1 );

                truck_head_length = 145;
                var truck_head_1 = new THREE.Mesh(
                    new THREE.BoxGeometry( 200, 100, truck_head_length, 1, 1, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_1.position.x = 0;
                truck_head_1.position.y = -50;
                truck_head_1.position.z = -(container_length/2 + truck_head_length/2);
                scene.add( truck_head_1 );
                
                truck_head_length_2 = 80;
                var truck_head_2 = new THREE.Mesh(
                    new THREE.BoxGeometry( 170, 60, truck_head_length_2, 1, 0, 5 ), 
                    new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe:true } )
                );
                truck_head_2.position.x = 0;
                truck_head_2.position.y = 30;
                truck_head_2.position.z = -(container_length/2 + truck_head_length_2/2);
                scene.add( truck_head_2 );
                
                truck_head_chimney_radius = 7;
                var truck_head_chimney1 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney1.position.x = 100;
                truck_head_chimney1.position.y = 50;
                truck_head_chimney1.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney1 );
                
                var truck_head_chimney2 = new THREE.Mesh(
                    new THREE.CylinderGeometry( truck_head_chimney_radius, truck_head_chimney_radius, 300, 20 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_head_chimney2.position.x = -100;
                truck_head_chimney2.position.y = 50;
                truck_head_chimney2.position.z = -(container_length/2 + truck_head_chimney_radius/2);
                scene.add( truck_head_chimney2 );
        
                var truck_wheel_1 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_1.position.x = 110;
                truck_wheel_1.position.y = -100;
                truck_wheel_1.position.z = -(container_length/2 + truck_head_length_2/2 + 20) ;
                truck_wheel_1.rotation.x = 0;
                truck_wheel_1.rotation.y = 0;
                truck_wheel_1.rotation.z = 1.6;
                scene.add( truck_wheel_1 );
                
                var truck_wheel_2 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_2.position.x = -110;
                truck_wheel_2.position.y = -100;
                truck_wheel_2.position.z = -(container_length/2 + truck_head_length_2/2 + 20);
                truck_wheel_2.rotation.x = 0;
                truck_wheel_2.rotation.y = 0;
                truck_wheel_2.rotation.z = 1.6;
                scene.add( truck_wheel_2 );

                offset_2 = -240;
                var truck_wheel_5 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_5.position.x = container_width/2 + 5;
                truck_wheel_5.position.y = -100;
                truck_wheel_5.position.z = (container_length/2 + truck_head_length_2/2 + offset_2) ;
                truck_wheel_5.rotation.x = 0;
                truck_wheel_5.rotation.y = 0;
                truck_wheel_5.rotation.z = 1.6;
                scene.add( truck_wheel_5 );

                var truck_wheel_6 = new THREE.Mesh(new THREE.CylinderGeometry( 50, 50, 20, 50 ), 
                    new THREE.MeshBasicMaterial( { color:0xffffff, wireframe:true } )
                );
                truck_wheel_6.position.x = -container_width/2 - 5;
                truck_wheel_6.position.y = -100;
                truck_wheel_6.position.z = (container_length/2 + truck_head_length_2/2 + offset_2);
                truck_wheel_6.rotation.x = 0;
                truck_wheel_6.rotation.y = 0;
                truck_wheel_6.rotation.z = 1.6;
                scene.add( truck_wheel_6 );

                for (var i in objectArray) {
                    if (objectArray[i].type==2) {
						var cylinderTopR = objectArray[i].length / 2;
						var cylinderHeight = objectArray[i].height;
						if (objectArray[i].place == 1 || objectArray[i].place == 2)
						{
							cylinderHeight = objectArray[i].width;
						}
						
                        var object2 = new THREE.Mesh(
						    new THREE.CylinderGeometry(cylinderTopR, cylinderTopR, cylinderHeight, 60),
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object2.position.x = objectArray[i].x;
                        object2.position.y = objectArray[i].y;
                        object2.position.z = objectArray[i].z;
                        if (objectArray[i].place==1) {
                            object2.rotation.z = 55;
                        }
                        if (objectArray[i].place==2) {
                            object2.rotation.x = 55;
                        }
                        object2.width = objectArray[i].width;
                        object2.height = objectArray[i].height;
                        object2.length = objectArray[i].length;
                        object2.weight = objectArray[i].weight;
                        object2.platform = objectArray[i].platform;
                        object2.order = objectArray[i].order;
                        object2.materialInfo = objectArray[i].material;
                        object2.boxId = objectArray[i].boxId;
                        object2.type = objectArray[i].type;
                        object2.place = objectArray[i].place;
                        scene.add( object2 );
                        objects.push( object2 );
                    }
                    if (objectArray[i].type==1) {
						if (objectArray[i].place == 200)
						{
							var box_length = objectArray[i].width;
                            var box_width = objectArray[i].length;
						}
						else
						{
							var box_length = objectArray[i].length;
							var box_width = objectArray[i].width;
						}
						var box_height = objectArray[i].height;
                        var object = new THREE.Mesh(
                            new THREE.BoxGeometry( box_width, box_height, box_length, 1, 1, 1 ), 
                            new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff , wireframe:false } ) 
                        ); 
                        object.position.x = objectArray[i].x;
                        object.position.y = objectArray[i].y;
                        object.position.z = objectArray[i].z;
						object.length = objectArray[i].length;
						object.width = objectArray[i].width;
						object.height = objectArray[i].height;
                        object.weight = objectArray[i].weight;
                        object.platform = objectArray[i].platform;
                        object.order = objectArray[i].order;
                        object.materialInfo = objectArray[i].material;
                        object.boxId = objectArray[i].boxId;
                        object.type = objectArray[i].type;
                        object.place = objectArray[i].place;
                        scene.add( object );
                        objects.push( object );
                    }
                }

                plane = new THREE.Mesh(
                    new THREE.PlaneGeometry( 2000, 2000, 8, 8 ),
                    new THREE.MeshBasicMaterial( { color: 0x000000, opacity: 0.25, transparent: true, wireframe: true } )
                );
                plane.visible = true;
                scene.add( plane );
                projector = new THREE.Projector();
                renderer = new THREE.WebGLRenderer( { antialias: true } );
                renderer.sortObjects = false;
                renderer.setSize( window.innerWidth, window.innerHeight );
                renderer.shadowMapEnabled = true;
                renderer.shadowMapType = THREE.PCFShadowMap;
                container.appendChild( renderer.domElement );

                stats = new Stats();
                stats.domElement.style.position = 'absolute';
                stats.domElement.style.top = '0px';
                container.appendChild( stats.domElement );

                window.addEventListener( 'resize', onWindowResize, false );
                renderer.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );
                renderer.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );
                renderer.domElement.addEventListener( 'mouseup', onDocumentMouseUp, false );
            }

            function onDocumentMouseMove( event ) {
                event.preventDefault();
                mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
                mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    if ( INTERSECTED != intersects[ 0 ].object ) {
                        INTERSECTED = intersects[ 0 ].object;
                        plane.position.copy( INTERSECTED.position );
                        plane.lookAt( camera.position );
                    }
                    container.style.cursor = 'pointer';
                } else {
                    container.style.cursor = 'auto';
                }
            }

            function onDocumentMouseDown( event ) {
                event.preventDefault();
                var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
                projector.unprojectVector( vector, camera );
                var raycaster = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );
                var intersects = raycaster.intersectObjects( objects );
                if ( intersects.length > 0 ) {
                    controls.enabled = false;  
                    SELECTED = intersects[ 0 ].object;
                    var info = '<B>' + 
                        'boxId: ' + SELECTED.boxId +
                        '</br> x: ' + SELECTED.position.x + 
                        '</br> y: ' + SELECTED.position.y + 
                        '</br> z: ' + SELECTED.position.z + 
                        '</br> width: ' + SELECTED.width + 
                        '</br> height: ' + SELECTED.height + 
                        '</br> length: ' + SELECTED.length + 
                        '</br> weight: ' + SELECTED.weight +
                        '</br> platform: ' + SELECTED.platform +
                        '</br> order: ' + SELECTED.order +
                        '</br> material: ' + SELECTED.materialInfo + 
                        '</br> type: ' + SELECTED.type + 
                        '</br> place: ' + SELECTED.place + 
                        '</B>' +
                        '</br>' + 
                        '--------------------------' + 
                        '</br>' +
                        'type(1:箱体 2:圆柱体)' +
                        '</br>' +
                        'place(1:品字型 2:田字型)';
                    $("#objectInfo").html(info);
                }
            }

            function onDocumentMouseUp( event ) {
                event.preventDefault();
                controls.enabled = true;
                if ( INTERSECTED ) {
                    plane.position.copy( INTERSECTED.position );
                    SELECTED = null;
                }
                container.style.cursor = 'auto';
            }

            function onWindowResize() {
                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();
                renderer.setSize( window.innerWidth, window.innerHeight );
            }

            function animate() {
                requestAnimationFrame( animate );
                render();
                stats.update();
            }

            function render() {
                controls.update();
                renderer.render( scene, camera );
            }

        </script>
        <div id="objectInfo" class="a2"><br/>点击物体获取相关属性</div>
        <style>
            .a2{position:absolute; left:20px; top:50px; bottom:0px; width:180px; height:250px; z-index:9999; background: #00FFFF; font-weight:bold; }
        </style>
    </body>
</html>